<?php
class Car {
	
	var $id;
	
	var $make;
	
	var $model;
	
	var $price;
	
	var $color;

	var $photo;

	var $pic1;
	var $pic2;
	var $pic3;
	var $pic4;
	
	//car details
	var $vehicle;
	var $door;
	var $cylind;
	var $fuel;
	var $gear;
	var $gearbox;
	var $odometer;
	var $rego;
	var $stock;
	var $utime;
	var $vin;
	var $comments;

	var $options = array();
	
	function Car($id, $make, $model, $price, $color,$photo) {
		$this->id = $id;
		$this->make = $make;
		$this->model = $model;
		$this->price = $price;
		$this->color = $color;
		$this->photo = $photo;
	}

	function setPics($pic1,$pic2,$pic3,$pic4) {
		$this->pic1 = $pic1;
		$this->pic2 = $pic2;
		$this->pic3 = $pic3;
		$this->pic4 = $pic4;
	}
	
	function setDetails($vehicle, $door, $cylind, $fuel, $gear, $gearbox, 
						$odometer, $rego, $stock, $utime, $vin, $commonts) {
		$this->vehicle = $vehicle;
		$this->door = $door;
		$this->cylind = $cylind;
		$this->fuel = $fuel;
		$this->gear = $gear;
		$this->gearbox = $gearbox;
		$this->odometer = $odometer;
		$this->rego = $rego;
		$this->stock = $stock;
		$this->utime = $utime;
		$this->vin = $vin;
		$this->comments = $commonts;	
	}
	
	function getOptions() {
		return $this->options;
	}
	
	function addToOptions($optionId) {
		$this->options[] = $optionId;
	}
	
	function __toString() {
		return ": ".$this->id." : ".$this->photo." : ".$this->door." :";	
	}
}
?>
